﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class admin_category_category : System.Web.UI.Page
{
    //用来在修改分类信息时传递参数
    public String Cid
    {
        get;
        set;
    }
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void category_gridview_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName.Equals("deleteCategory"))
        {
            int categoryId = Convert.ToInt32(e.CommandArgument);
            DB db = new DB();
            db.deleteCategory(categoryId);
        }else
            if (e.CommandName.Equals("editCategory"))
            {
                Cid = Convert.ToString(e.CommandArgument);
                Server.Transfer("modifyCategory.aspx");
            }
    }
}
